package cn.com.yusys.yusp.mobile.service;

import cn.com.yusys.yusp.mobile.repository.mapper.MyGridMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Map;

@Service
public class MyGridService {

    @Resource
    MyGridMapper myGridMapper;

    @Transactional
    public int insertCustomer(Map map) {
        if (myGridMapper.getCustomerCtfNo(map) >0){
            return 0;
        }
        return  myGridMapper.insertCustomer(map);
    }

    @Transactional
    public int insertMerchant(Map map) {
        return  myGridMapper.insertMerchant(map);
    }

    @Transactional
    public int updateMerchant(Map map) {
        return  myGridMapper.updateMerchant(map);
    }

}
